{{ 'section-main-product.css' | asset_url | stylesheet_tag }}       
<div class="bvb-banner" id="tenways_bvb">
   <div class="bvb-content">
      <div class="bvb-top">
        {%- if section.settings.button_link != blank -%}
          <a{% if section.settings.button_link != blank %} href="{{ section.settings.button_link }}"{% endif %} class="no-underline"{% if section.settings.button_link == blank %} aria-disabled="true"{% endif %}>
      {% endif %}
        <div class="pc_banner image-with-text__media image-with-text__media--{{ section.settings.height }} {% if section.settings.image != blank %}media{% else %}image-with-text__media--placeholder placeholder{% endif %}"
            {% if section.settings.height == 'adapt' and section.settings.image != blank %} style="padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%;"{% endif %}
            >
            {%- if section.settings.image != blank -%}
            <img
                srcset="{%- if section.settings.image.width >= 375 -%}{{ section.settings.image | img_url: '375x' }} 375w,{%- endif -%}
                {%- if section.settings.image.width >= 750 -%}{{ section.settings.image | img_url: '750x' }} 750w,{%- endif -%}
                {%- if section.settings.image.width >= 1400 -%}{{ section.settings.image | img_url: '1500x' }} 1500w,{%- endif -%}
                {%- if section.settings.image.width >= 1500 -%}{{ section.settings.image | img_url: '1500x' }} 1500w,{%- endif -%}
                {%- if section.settings.image.width >= 1780 -%}{{ section.settings.image | img_url: '1780x' }} 1780w,{%- endif -%}
                {%- if section.settings.image.width >= 2000 -%}{{ section.settings.image | img_url: '2000x' }} 2000w,{%- endif -%}
                {%- if section.settings.image.width >= 3000 -%}{{ section.settings.image | img_url: '3000x' }} 3000w,{%- endif -%}
                {%- if section.settings.image.width >= 3840 -%}{{ section.settings.image | img_url: '3840x' }} 3840w,{%- endif -%}"
                data-src="{{ section.settings.image | img_url: '1500x' }}"
                alt="{{ section.settings.image.alt | escape }}"
                loading="lazy"
                class="lazyload"
                width="{{ section.settings.image.width }}"
                height="{{ section.settings.image.height }}"
            >
            {%- else -%}
            {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
            {%- endif -%}
        </div>
        <div class="image_mobile image-with-text__media image-with-text__media--{{ section.settings.height }} {% if section.settings.image_mobile != blank %}media{% else %}image-with-text__media--placeholder placeholder{% endif %}"
            {% if section.settings.height == 'adapt' and section.settings.image_mobile != blank %} style="padding-bottom: {{ 1 | divided_by: section.settings.image_mobile.aspect_ratio | times: 100 }}%;"{% endif %}
            >
            {%- if section.settings.image_mobile != blank -%}
            <img
            srcset="{%- if section.settings.image_mobile.width >= 375 -%}{{ section.settings.image_mobile | img_url: '375x' }} 375w,{%- endif -%}
            {%- if section.settings.image_mobile.width >= 412 -%}{{ section.settings.image_mobile | img_url: '412x' }} 412w,{%- endif -%}
            {%- if section.settings.image_mobile.width >= 750 -%}{{ section.settings.image_mobile | img_url: '750x' }} 750w,{%- endif -%}
            {%- if section.settings.image_mobile.width >= 1100 -%}{{ section.settings.image_mobile | img_url: '1100x' }} 1100w,{%- endif -%}
            {%- if section.settings.image_mobile.width >= 1500 -%}{{ section.settings.image_mobile | img_url: '1500x' }} 1500w,{%- endif -%}
            {%- if section.settings.image_mobile.width >= 1780 -%}{{ section.settings.image_mobile | img_url: '1780x' }} 1780w,{%- endif -%}
            {%- if section.settings.image_mobile.width >= 1903 -%}{{ section.settings.image_mobile | img_url: '1903x' }} 1903w,{%- endif -%}
            {{ section.settings.image_mobile | img_url: 'master' }} {{ section.settings.image_mobile.width }}w"
            sizes="{% if section.settings.image_2 != blank and section.settings.stack_images_on_mobile %}(min-width: 750px) 50vw, 100vw{% elsif section.settings.image_2 != blank %}50vw{% else %}100vw{% endif %}"
            src="{{ section.settings.image_mobile | img_url: '1500x' }}"
            loading="lazy"
            alt="{{ section.settings.image_mobile.alt | escape }}"
            width="{{ section.settings.image_mobile.width }}"
            height="{{ section.settings.image_mobile.width | divided_by: section.settings.image_mobile.aspect_ratio }}"
            >
            {%- else -%}
            {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
            {%- endif -%}
        </div>
        {%- if section.settings.button_link != blank -%}
        </a>
       {% endif %}
      </div>
      <div class="bvb-bottom">
        <div class="page-width">
            {%- for block in section.blocks -%}
                {%- if block.settings.button_label != blank -%}
                    <a{% if block.settings.button_link != blank %} href="{{ block.settings.button_link }}"{% endif %} class="explore-more tenways-hover button{% if block.settings.button_style_secondary %} button--secondary{% else %} button--primary{% endif %}"{% if block.settings.button_link == blank %} aria-disabled="true"{% endif %} {{ block.shopify_attributes }}>
                    {{ block.settings.button_label | escape }}
                   </a>
               {%- endif -%}  
               {% if block.settings.button_label_1 != blank %}
               <modal-opener class="twy-button product-popup-modal__opener no-js-hidden" data-modal="#PopupModal-{{ section.id }}" >
                 <button id="ProductPopup-{{ section.id }}" class="product-popup-modal__button link" type="button" aria-haspopup="dialog">
                   {{ block.settings.button_label_1 | escape }} {% render 'icon-explore' %}
                 </button>
               </modal-opener>
               {% endif %}  
            {%- endfor -%}  
        </div>  
      </div>
   </div>
   <modal-dialog id="PopupModal-{{ section.id }}" class="product-popup-modal">
    <div role="dialog" aria-label="{{ section.settings.button_label_1 }}" aria-modal="true" class="product-popup-modal__content" >
      <div class="con_popup">
     
          <video loop controls playsinline poster="https://cdn.shopify.com/s/files/1/0563/3926/7733/files/bvbbg.jpg?v=1678860336">
            <source src="https://cdn.shopify.com/videos/c/o/v/196e8491d36d4b988aa4fe1c0ed6a1cc.mp4" type="video/mp4">
            <source src="https://cdn.shopify.com/videos/c/o/v/196e8491d36d4b988aa4fe1c0ed6a1cc.ogg" type="video/ogg">
          </video> 
                
      </div>
      <button id="ModalClose-{{ section.id }}" type="button" class="product-popup-modal__toggle" aria-label="{{ 'accessibility.close' | t }}">{% render 'pop-close' %}</button>
    </div>
</modal-dialog> 
</div>

  

{% schema %}
    {
      "name": "Tenways BVB",
      "tag": "section",
      "class": "bvb-video spaced-section spaced-section--full-width",
      "settings": [
        {
          "type": "url",
          "id": "button_link",
          "label": "t:sections.image-with-text.blocks.button.settings.button_link.label"
         },
        {
        "type": "image_picker",
        "id": "image",
        "label": "t:sections.image-with-text.settings.image.label"
       },
        {
        "type": "image_picker",
        "id": "image_mobile",
        "label": "Image mobile"
        },
        {
      "type": "select",
      "id": "height",
      "options": [
        {
          "value": "adapt",
          "label": "t:sections.image-with-text.settings.height.options__1.label"
        },
        {
          "value": "small",
          "label": "t:sections.image-with-text.settings.height.options__2.label"
        },
        {
          "value": "large",
          "label": "t:sections.image-with-text.settings.height.options__3.label"
        }
      ],
      "default": "adapt",
      "label": "t:sections.image-with-text.settings.height.label"
    }
      ],
      "blocks": [
        {
        "type": "button",
        "name": "t:sections.image-with-text.blocks.button.name",
        "settings": [
            {
            "type": "text",
            "id": "button_label",
            "default": "Button label",
            "label": "t:sections.image-with-text.blocks.button.settings.button_label.label",
            "info": "t:sections.image-with-text.blocks.button.settings.button_label.info"
            },
            {
            "type": "url",
            "id": "button_link",
            "label": "t:sections.image-with-text.blocks.button.settings.button_link.label"
            },
            {
            "type": "text",
            "id": "button_label_1",
            "default": "Button label",
            "label": "t:sections.image-with-text.blocks.button.settings.button_label.label",
            "info": "t:sections.image-with-text.blocks.button.settings.button_label.info"
            }
        ]
        }
      ],
      "presets": [
        {
            "name": "Tenways BVB"
        }
      ]
    }
      {% endschema %}